package com.chunuo.cmsservice.controller;


import com.chunuo.cmsservice.entity.CrmBanner;
import com.chunuo.cmsservice.service.CrmBannerService;
import com.chunuo.commonutils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2020-07-18
 */
@RestController
@RequestMapping("/cmsservice/crm-banner")
public class CrmBannerController {

    @Autowired
    private CrmBannerService crmBannerService;

    @GetMapping("/findAll")
    public R findAll(){
        List<CrmBanner> banner = crmBannerService.findAll();
        return R.ok().data("bannerList",banner);
    }


}

